<?xml version="1.0" encoding="UTF-8" ?>
<ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	template="/templates/template.xhtml">
	<ui:param name="tituloPagina" value="#{tituloPagina}" />
	<ui:param name="bean" value="#{bean}" />
	<ui:param name="renderedBtnSalvar" value="#{renderedBtnSalvar}" />
	<ui:param name="renderedBtnSalvarContinuar"
		value="#{renderedBtnSalvarContinuar}" />

	<ui:define name="cont">
			<ui:insert name="contList">
			</ui:insert>
		<p:dialog id="mdlAlterarConta" header="Alterar Conta" widgetVar="dlg"
			height="250" width="500" resizable="false" modal="true">

			<h:form id="formModalAlterarConta" class="form-horizontal" action="#"
				style="border-radius: 0px;" acceptcharset="ISO-8859-1">

				<div class="form-group">
					<h:outputLabel id="outSaldo" value="Saldo R$"
						styleClass="col-sm-3 control-label" />
					<div class="col-sm-6">
						<h:inputText id="inptSaldo" styleClass="form-control money"
							value="#{modalAlterarContaBean.contaSelecionada.saldo}">
							<f:convertNumber pattern="#,###,##0.00" />
						</h:inputText>

						<div class="checkbox">
							<label> <h:selectBooleanCheckbox id="chkNegativo"
									value="#{modalAlterarContaBean.negativo}" /> Negativo
							</label>
						</div>
					</div>
				</div>

				<div class="form-group">
					<h:outputLabel id="outTitulo" value="Título"
						styleClass="col-sm-3 control-label" />
					<div class="col-sm-6">
						<h:inputText id="inptTitulo" styleClass="form-control"
							value="#{modalAlterarContaBean.contaSelecionada.titulo}"
							required="true" />
						<h:message id="msg" for="inptTitulo" class="mensagens" />
					</div>
				</div>

				<div class="form-group" style="margin-left: 45px;">
					<div class="col-sm-offset-2 col-sm-10">

						<p:commandButton id="btnSalvar"
							action="#{modalAlterarContaBean.alteraConta}" value="Salvar"
							oncomplete="handleLoginRequest(xhr, status, args)" />

						<p:commandButton id="btnVoltar" value="Voltar"
							oncomplete="dlg.hide()" process="@this" />
					</div>
				</div>

			</h:form>
		</p:dialog>

	</ui:define>

</ui:composition>